<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: icolor</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: icolor</td>
      <td class="subheader-left"><a href="matlab:open icolor">View code for icolor</a></td>
    </tr>
  </table>
<h1>icolor</h1><p><span class="helptopic">Colorize a greyscale image</span></p><p>
<strong>C</strong> = <span style="color:red">icolor</span>(<strong>im</strong>) is a color image <strong>C</strong> (HxWx3)where each color plane is equal
to <strong>im</strong> (HxW).

</p>
<p>
<strong>C</strong> = <span style="color:red">icolor</span>(<strong>im</strong>, <strong>color</strong>) as above but each output pixel is <strong>color</strong> (3x1) times
the corresponding element of <strong>im</strong>.

</p>
<h2>Examples</h2>
<p>
Create a color image that looks the same as the greyscale image

</p>
<pre style="width: 90%%;" class="examples">
c&nbsp;=&nbsp;icolor(im);
</pre>
<p>
each set pixel in im is set to [1 1 1] in the output.

</p>
<p>
Create an rose tinted version of the greyscale image

</p>
<pre style="width: 90%%;" class="examples">
c&nbsp;=&nbsp;icolor(im,&nbsp;colorname('pink'));
</pre>
<p>
each set pixel in im is set to [0 1 1] in the output.

</p>
<h2>Notes</h2>
<ul>
  <li>Can convert a monochrome sequence (HxWxN) to a color image
sequence (HxWx3xN).</li>
</ul>
<h2>See also</h2>
<p>
<a href="matlab:doc imono">imono</a>, <a href="matlab:doc colorize">colorize</a>, <a href="matlab:doc ipixswitch">ipixswitch</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2012 Peter Corke.</p>
</body></html>